and yes, i do know that i have to add two new [QUERYABLE] indexes (for recordName and modifiedTimestamp) to each of my record types. this did not get my public data into CloudKit
Post
Replies
Boosts
Views
Activity
i also notice that canModifyManagedObjectsInStore returns NO for the public store, which apparently means that my public core data is not backed by CloudKit (how do i fix that?) or some other issue (can anyone suggest why that might be?). maybe this gets me closer, but it just changes the questions into different ones for which I still can't find an answer.
your var definition recreates the managed object context each time it is called. try redefining it as follows to only create it the first time it is called:
lazy var storeCoordinator: NSPersistentStoreCoordinator = {
let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
let url = self.documentDir.appendingPathComponent("Listen.sqlite")
do {
try coordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: url, options: nil)
} catch {
print(error)
}
return coordinator
}()
where do i add the get-task-allow and CODE_SIGN_INJECT_BASE_ENTITLEMENTS? I added them both to my plist, but with hardened runtime added, xcode won't attach, and with it not added, xcode will. so, if your answer is, yes, to your plist, then my question becomes: what else do i also need to do in addition to adding those two?
Furthermore, adding CODE_SIGN... and removing hardened runtime cause Xcode to not be able to launch my app. removing both allows normal launch and debug to succed. Is this known? Can you explain?
i was able to get the attach to succeed by removing the hardened runtime capability from the Signing and Capabilities tab in the target preferences. how obscure is that? and i do not know what will be the negative consequences of doing this.
turns out one can remove existing constraints on each subview of the toolbar and replace them such that those that were hidden will appear in there proper positions. and yes, I know this is frowned upon, but desperation drives me. this is my Swift 4.0 version of such code. it uses a third-party framework called SnapKit, which is simpler for me for constructing constraints:
var x = 7.0
for tool in subviews {
let y = tool.isHidden ? -3.0 : -8.0
tool.removeConstraints(tool.constraints)
tool.snp.makeConstraints { make in
make.left.equalToSuperview().offset(x)
make.bottom.equalToSuperview().offset(y)
}
x += tool.bounds.width + 3.0
tool.isHidden = false
}